/*     */ package com.cr.business;
/*     */ 
/*     */ import com.cr.business.domain.CrAmountFlow;
/*     */ import com.cr.business.service.ICrAmountFlowService;
/*     */ import com.cr.common.annotation.Log;
/*     */ import com.cr.common.core.controller.BaseController;
/*     */ import com.cr.common.core.domain.AjaxResult;
/*     */ import com.cr.common.core.page.TableDataInfo;
/*     */ import com.cr.common.enums.BusinessType;
/*     */ import com.cr.common.utils.poi.ExcelUtil;
/*     */ import java.util.List;
/*     */ import org.apache.shiro.authz.annotation.RequiresPermissions;
/*     */ import org.springframework.beans.factory.annotation.Autowired;
/*     */ import org.springframework.stereotype.Controller;
/*     */ import org.springframework.ui.ModelMap;
/*     */ import org.springframework.web.bind.annotation.GetMapping;
/*     */ import org.springframework.web.bind.annotation.PathVariable;
/*     */ import org.springframework.web.bind.annotation.PostMapping;
/*     */ import org.springframework.web.bind.annotation.RequestMapping;
/*     */ import org.springframework.web.bind.annotation.ResponseBody;
/*     */ 
/*     */ @Controller
/*     */ @RequestMapping({"/business/flow"})
/*     */ public class CrAmountFlowController extends BaseController {
/*  32 */   private String prefix = "business/flow";
/*     */   
/*     */   @Autowired
/*     */   private ICrAmountFlowService crAmountFlowService;
/*     */   
/*     */   @RequiresPermissions({"business:flow:view"})
/*     */   @GetMapping
/*     */   public String flow() {
/*  41 */     return this.prefix + "/flow";
/*     */   }
/*     */   
/*     */   @RequiresPermissions({"business:flow:list"})
/*     */   @PostMapping({"/list"})
/*     */   @ResponseBody
/*     */   public TableDataInfo list(CrAmountFlow crAmountFlow) {
/*  52 */     startPage();
/*  53 */     List<CrAmountFlow> list = this.crAmountFlowService.selectCrAmountFlowList(crAmountFlow);
/*  54 */     return getDataTable(list);
/*     */   }
/*     */   
/*     */   @RequiresPermissions({"business:flow:export"})
/*     */   @Log(title = "平台结算流水", businessType = BusinessType.EXPORT)
/*     */   @PostMapping({"/export"})
/*     */   @ResponseBody
/*     */   public AjaxResult export(CrAmountFlow crAmountFlow) {
/*  66 */     List<CrAmountFlow> list = this.crAmountFlowService.selectCrAmountFlowList(crAmountFlow);
/*  67 */     ExcelUtil<CrAmountFlow> util = new ExcelUtil(CrAmountFlow.class);
/*  68 */     return util.exportExcel(list, "平台结算流水数据");
/*     */   }
/*     */   
/*     */   @GetMapping({"/add"})
/*     */   public String add() {
/*  77 */     return this.prefix + "/add";
/*     */   }
/*     */   
/*     */   @RequiresPermissions({"business:flow:add"})
/*     */   @Log(title = "平台结算流水", businessType = BusinessType.INSERT)
/*     */   @PostMapping({"/add"})
/*     */   @ResponseBody
/*     */   public AjaxResult addSave(CrAmountFlow crAmountFlow) {
/*  89 */     return toAjax(this.crAmountFlowService.insertCrAmountFlow(crAmountFlow));
/*     */   }
/*     */   
/*     */   @GetMapping({"/edit/{recordId}"})
/*     */   public String edit(@PathVariable("recordId") Long recordId, ModelMap mmap) {
/*  98 */     CrAmountFlow crAmountFlow = this.crAmountFlowService.selectCrAmountFlowByRecordId(recordId);
/*  99 */     mmap.put("crAmountFlow", crAmountFlow);
/* 100 */     return this.prefix + "/edit";
/*     */   }
/*     */   
/*     */   @RequiresPermissions({"business:flow:edit"})
/*     */   @Log(title = "平台结算流水", businessType = BusinessType.UPDATE)
/*     */   @PostMapping({"/edit"})
/*     */   @ResponseBody
/*     */   public AjaxResult editSave(CrAmountFlow crAmountFlow) {
/* 112 */     return toAjax(this.crAmountFlowService.updateCrAmountFlow(crAmountFlow));
/*     */   }
/*     */   
/*     */   @RequiresPermissions({"business:flow:remove"})
/*     */   @Log(title = "平台结算流水", businessType = BusinessType.DELETE)
/*     */   @PostMapping({"/remove"})
/*     */   @ResponseBody
/*     */   public AjaxResult remove(String ids) {
/* 124 */     return toAjax(this.crAmountFlowService.deleteCrAmountFlowByRecordIds(ids));
/*     */   }
/*     */ }


/* Location:              D:\tmp\creditorRights-admin\BOOT-INF\classes\com.zip!\com\cr\business\CrAmountFlowController.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */